<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>兑换设置</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  {include file="public/css"/}
</head>
<body>
  <div class="layui-fluid">
    <div class="layui-row layui-col-space15">
      <div class="layui-card layui-col-md12">
				<div class="layui-card-header">
					<i class="fa fa-cog"></i> 兑换设置<i class="layui-icon layui-icon-close" style="font-size:18px;font-weight:bold;cursor:pointer" onclick="closeself()"></i>
				</div>
				<div class="layui-card-body" pad15>
					<div class="layui-form form-label-w8" lay-filter="">
						
						<div class="layui-form-item">
							<label class="layui-form-label">状态：</label>
							<div class="layui-input-inline">
								<input type="radio" name="info[status]" value="1" title="开启" {if !$info['id'] || $info['status']==1}checked{/if}>
								<input type="radio" name="info[status]" value="0" title="关闭" {if $info['status']==0}checked{/if}>
							</div>
						</div>
            <div class="layui-form-item">
							<label class="layui-form-label">扫一扫图标：</label>
							<div class="layui-input-inline">
								<input type="radio" name="info[scanshow]" value="1" title="显示" {if !$info['id'] || $info['scanshow']==1}checked{/if}>
								<input type="radio" name="info[scanshow]" value="0" title="不显示" {if $info['scanshow']==0}checked{/if}>
							</div>
						</div>
						
						<!-- 详情编辑器 -->
						<div class="layui-form-item">
							<label class="layui-form-label">规则说明：</label>
							<div class="layui-input-inline" style="width:500px">
								<script id="guize" name="info[guize]" type="text/plain" style="width:100%;height:500px">{$info.guize}</script>
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label"></label>
							<div class="layui-input-block">
								<button class="layui-btn" lay-submit lay-filter="formsubmit">提 交</button>
							</div>
						</div>
					</div>
					
				</div>
			</div>
		</div>
	</div>
	{include file="public/js"/}
	<script>
	var ueditor = UE.getEditor('guize');
	layui.form.on('submit(formsubmit)', function(obj){
		var field = obj.field
		field['info[guize]'] = ueditor.getContent();
		var index = layer.load();
		$.post('',field,function(data){
			layer.close(index);
			dialog(data.msg,data.status);
			if(data.status==1){
				setTimeout(function(){
					location.href = location.href
				},1000)
			}
		})
	})
  </script>
	{include file="public/copyright"/}
</body>
</html>